package com.zy.springboot.entity.book;

import com.alibaba.fastjson.JSONObject;
import com.zy.springboot.entity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by y on 2019/1/11.
 */
@Entity
@Table(name = "T_SYS_RECORDS", schema = "booksearch", catalog = "")
public class RecordsEntity extends BaseEntity implements Serializable {

    private String bookId;
    private String openId;
    private String index2;//

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getIndex2() {
        return index2;
    }

    public void setIndex2(String index2) {
        this.index2 = index2;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("BOOKID", this.getBookId());
        obj.put("OPENID", this.getOpenId());
        obj.put("INDEX2",this.getIndex2());
        obj.put("CREATE_TIME",this.getCreateTime());
        obj.put("UPDATE_TIME", this.getUpdateTime());
        obj.put("DEL_FLAG",this.getDelFlag());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_SYS_RECORDS";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("BOOKID", "bookId");
        obj.put("OPENID", "openid");
        obj.put("INDEX2","index2");
        obj.put("CREATE_TIME", "createTime");
        obj.put("UPDATE_TIME", "updateTime");
        obj.put("DEL_FLAG","delFlag");
        return obj;
    }

}

